#include <iostream>
#include <math.h>
using namespace std;


int main(){
	long long x,y,n;
	cin>>x>>y>>n;
	x--;
	y--;
	long long ans;
	if(y/10 >= x)
		cout<<n*x;
	else{
		if(n%10 == 0)
			cout<<(n/10)*y;
		else{
			ans = (n/10)*y+(n%10)*x;
			cout<<ans;
		}
	}
	return 0;
}
